var __SINA_SURVEY_DATA={"survey":{"id":"1574","creator":"huifang6","title":"\u5fb7\u90a6\u5feb\u9012\u5458\u9500\u6bc1\u5ba2\u623715\u4e07\u5305\u88f9","description":"\u5fb7\u90a6\u7269\u6d41\u5feb\u9012\u5458\u5c06\u5ba2\u6237\u4ef7\u503c15\u4e07\u5143\u5305\u88f9\u5f53\u5783\u573e\u9500\u6bc1\u4ec5\u8d54300\u5143\uff0c\u6d89\u4e8b\u5feb\u9012\u5458\u79f0\u5df2\u591a\u6b21\u9053\u6b49\uff0c\u4f46\u5931\u4e3b\u4e0d\u65ad\u52a0\u4ef7\uff0c\u4e14\u4ece\u672a\u8bf4\u8fc7\u8d54\u507f300\u5143\uff0c\u5feb\u9012\u5458\u8868\u793a\u59cb\u7ec8\u672a\u89c1\u8d27\u7269\u6e05\u5355\u3002","keyword":"\u5fb7\u90a6\u5feb\u9012","start_time":"1566198960","end_time":"4102416000","type":"1","channel":"8","status":"1","anti_cheat_strategy":"0","qr_code":"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAACiAQMAAAD4PIRYAAAABlBMVEX\/\/\/8AAABVwtN+AAAA\/0lEQVRIic2W0Q3EIAxDIzFAR2L1jsQASLk4DhW9AUyj3gle+2ElTsDsA9Ec0YbZ5T46NkNO42c9\/gPFwkjUtMe++d2SNqo8Qz2y08ZJSjTtFLUnKZkgO0DLqZ3Pn381dAVytO+VFB4Ni2SfRMyr9Iqpo1UsR0Z8cU+T0zTo5NiKd1App1TGqXHdjo\/UFIObXZr6qkJaGpoCZJMgO\/G69AppHiGY3cFnNrAdoFCDOsGs6JYppzw\/8DBHy6lK+ojzbYiLKSc4+iQbhqZR07rZ5FGKUrFCYrpuFVRZs+QArStmLQ7RZdOQtSmTUVaoFv6um4imoJwaPD\/6dt8R0Q\/ED4AswG47WkVCAAAAAElFTkSuQmCC","others":{"result_show":"1","user_result_show":"0","result_save":"0","result_order":"0","result_order_q":"0","true_result":"1","vote_show":"1","vote_submit":"1","vote_login":"1","voter_source":"0","share_img":"https:\/\/n.sinaimg.cn\/default\/46b60762\/20171013\/sinavotepic.png","comment":"1","survey_summary":"\u6295\u7968\u6210\u529f\uff0c\u611f\u8c22\u60a8\u7684\u53c2\u4e0e\uff01","redirect_url":"http:\/\/www.sina.com.cn","display_type":"3","text_detail":"","text_detail_url":"","repetition_attr":"0","count_per_type":"1","repetition_user_cookie_device":"1","repetition_interval":"","repetition_freq":"","repetition_end_msg":"","result_interval_show":"0","result_address":"1","group":"2","vote_list_order":"1","vote_end_msg":"","repetition_interval_did":"0","repetition_freq_did":"0","final_result_show":1},"created_time":"1566199022","modified_time":"1566199022"},"content":{"question":[{"id":"29381","survey_id":"1574","type":"1","parent_id":"1574","sort_id":"1","status":"1","description":"\u4f60\u4ee5\u540e\u8fd8\u4f1a\u4e0d\u4f1a\u7528\u5fb7\u90a6\u5feb\u9012\uff1f","others":{"question_selection":"1","question_type":"1","group_id":"","answer_order":"0","button_des":"","button_status_des":"","question_img":"","checkbox_num_least":0,"checkbox_num_most":0,"score_display_type":0,"score_num_least":0,"score_num_most":0,"standard_point":0},"created_time":"1566199489","modified_time":"1566199489","r_aids":[],"answers":[29382,29383,29384]},{"id":"29385","survey_id":"1574","type":"1","parent_id":"1574","sort_id":"2","status":"1","description":"\u4f60\u5bf9\u5fb7\u90a6\u5feb\u9012\u7684\u56de\u5e94\u662f\u5426\u6ee1\u610f\uff1f","others":{"question_selection":"1","question_type":"1","group_id":"","answer_order":"0","button_des":"","button_status_des":"","question_img":"","checkbox_num_least":0,"checkbox_num_most":0,"score_display_type":0,"score_num_least":0,"score_num_most":0,"standard_point":0},"created_time":"1566199489","modified_time":"1566199489","r_aids":[],"answers":[29386,29387,29388]}],"answer":{"29381":[{"id":"29382","survey_id":"1574","type":"2","parent_id":"29381","sort_id":"1","status":"1","description":"\u4f1a","others":{"next_question":0,"answer_img":"","answer_img_url":"","answer_img_width":"","answer_img_height":"","answer_type_blank":0,"standard_point":0,"video_id":"","answer_note":"","next_question_id":29385},"created_time":"1566199489","modified_time":"1566199489"},{"id":"29383","survey_id":"1574","type":"2","parent_id":"29381","sort_id":"2","status":"1","description":"\u4e0d\u4f1a","others":{"next_question":0,"answer_img":"","answer_img_url":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"video_id":"","answer_note":"","next_question_id":29385},"created_time":"1566199489","modified_time":"1566199489"},{"id":"29384","survey_id":"1574","type":"2","parent_id":"29381","sort_id":"3","status":"1","description":"\u4e0d\u6e05\u695a","others":{"next_question":0,"answer_img":"","answer_img_url":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"video_id":"","answer_note":"","next_question_id":29385},"created_time":"1566199489","modified_time":"1566199489"}],"29385":[{"id":"29386","survey_id":"1574","type":"2","parent_id":"29385","sort_id":"1","status":"1","description":"\u6ee1\u610f","others":{"next_question":0,"answer_img":"","answer_img_url":"","answer_img_width":"","answer_img_height":"","answer_type_blank":0,"standard_point":0,"video_id":"","answer_note":"","next_question_id":null},"created_time":"1566199489","modified_time":"1566199489"},{"id":"29387","survey_id":"1574","type":"2","parent_id":"29385","sort_id":"2","status":"1","description":"\u4e0d\u6ee1\u610f","others":{"next_question":0,"answer_img":"","answer_img_url":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"video_id":"","answer_note":"","next_question_id":null},"created_time":"1566199489","modified_time":"1566199489"},{"id":"29388","survey_id":"1574","type":"2","parent_id":"29385","sort_id":"3","status":"1","description":"\u4e0d\u6e05\u695a","others":{"next_question":0,"answer_img":"","answer_img_url":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"video_id":"","answer_note":"","next_question_id":null},"created_time":"1566199489","modified_time":"1566199489"}]},"point":[],"group":[],"a_q":{"29382":29381,"29383":29381,"29384":29381,"29386":29385,"29387":29385,"29388":29385}},"total":{"true":{"survey":"24","modified_time":"1566522263","question":{"29381":"24","29385":"24"},"answer":{"29382":{"number":"4","score":0,"percent":16.67},"29383":{"number":"17","score":0,"percent":70.83},"29384":{"number":"3","score":0,"percent":12.5},"29386":{"number":"1","score":0,"percent":4.17},"29387":{"number":"20","score":0,"percent":83.33},"29388":{"number":"3","score":0,"percent":12.5}}},"fake":{"survey":"24","modified_time":"1566522263","question":{"29381":"24","29385":"24"},"answer":{"29382":{"number":"4","score":0,"percent":16.67},"29383":{"number":"17","score":0,"percent":70.83},"29384":{"number":"3","score":0,"percent":12.5},"29386":{"number":"1","score":0,"percent":4.17},"29387":{"number":"20","score":0,"percent":83.33},"29388":{"number":"3","score":0,"percent":12.5}}}},"records":null};
!function(){var t=window.__SINA_SURVEY_DATA||null,e=t&&t.survey.id,s={},n=window.location.href,a=".com";-1!=n.indexOf("sina.cn")&&(a="");var i="";window.sina_survey_config&&(i=window.sina_survey_config.host||"");var o="//"+i+"vote.sina"+a+".cn/api/survey/cast_vote",r="//"+i+"vote.sina"+a+".cn/api/survey/get_captcha/",c="//"+i+"vote.sina"+a+".cn/result/component/",u="//"+i+"vote.sina"+a+".cn/api/survey/vote_status/",d="//"+i+"vote.sina"+a+".cn/api/survey/info/",l={},_=null,h=document.getElementById("sina_survey_js_"+e),v={},p={},y={},g=null;e&&(s[e]=t,window.sina_survey_config&&window.sina_survey_config.callback&&(y[e]=window.sina_survey_config.callback));var m={addClass:function(t,e){new RegExp("\\b"+e+"\\b").test(t.className)||(t.className=(t.className+" "+e).match(/\S+/g).join(" "))},removeClass:function(t,e){var s=new RegExp("\\b"+e+"\\b","g");t.className=t.className.replace(s,"").replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")},getByClass:function(t,e){for(var s=t.getElementsByTagName("*"),n=new RegExp("\\b"+e+"\\b","i"),a=[],i=0;i320&&d<=480?Math.round(.3*(d-25)):Math.round(.23*(d-25)),o=Math.round(a/n*i);else if("sina"==r){h?u=h.parentNode:p[s]&&(u=p[s]);d=Math.round(m.getWidth(u));var l=m.getStyle(document.getElementsByTagName("html")[0],"fontSize").split("px")[0];i=Math.round((d-.8*l-.6*l-.1*l)/2),o=Math.round(a/n*i)}return{width:i,height:o}},addEvent:function(t,e,s){t.attachEvent?t.attachEvent("on"+e,s):t.addEventListener(e,s,!1)},removeEvent:function(t,e,s){t.detachEvent?t.detachEvent("on"+e,s):t.removeEventListener(e,s,!1)},browserRedirect:function(){var t=navigator.userAgent.toLowerCase(),e=window.location.href,s=window.location.host,n=t.match(/(sinanews|sinafinance)/i),a=t.match(/MicroMessenger/i);return n?-1!=e.indexOf("file://")?"client":"client_m":a?"wechat":-1!=s.indexOf("sina.cn")?"m":"pc"},getUrlKey:function(t){return t.substring(t.indexOf("code=")).split("&")[0].split("=")[1]},getCookie:function(t){var e=document.cookie.split("; "),s=0;for(s=0;s"),e.push(s+"="+n)}return e.join("&")},ajax:function(t,e){if((e=e||{}).data=e.data||{},e.data.t=e.data.t||(new Date).getTime(),e.method=e.method||"get","wechat"==f&&(e.data.code=m.getUrlKey(window.location.href)),"client"==f)g&&g.fetch({url:t,type:e.method,data:e.data},function(t){e.success&&e.success(t)});else{var s=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");if("post"==e.method){s.open("POST",t,!0),s.withCredentials=!0,s.setRequestHeader("Content-Type","application/x-www-form-urlencoded");try{s.send(e.data?this.json2url(e.data):null)}catch(t){}}else{t+="?"+this.json2url(e.data),s.open("GET",t,!0);try{s.send()}catch(t){}}s.onreadystatechange=function(){4==s.readyState&&(200==s.status?e.success&&e.success(s.responseText):e.error&&e.error(s.status))}}}},f=m.browserRedirect(),w="";n=n.replace(/([?|&])code=[^&]*/gi,"$1");var b="https://vote.sina.cn/weixin/router?final_redirect_url="+encodeURIComponent(n);if("wechat"==f&&t.survey.others.vote_login>0&&!window.sessionStorage.getItem("vote_wxCode")){window.sessionStorage.setItem("vote_wxCode",1);var x=encodeURIComponent(b);window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7ae02ffb0ec715d6&redirect_uri="+x+"&response_type=code&scope=snsapi_base#wechat_redirect"}"client"==f&&(w="https:"),window.sinaSurveyEvent={init:function(n){window.sina_survey_config=n,p[n.id]=m.getDom(n.parent),v[n.id]=n.parent,y[n.id]=n.callback,g=n.class,m.jsonp({url:w+d+n.id,success:function(n){0==n.result.status.code&&(t=n.result.data,e=t.survey.id,s[e]=t,T(e))}})},imgError:function(t){var e=t.parentNode,s=w+"//n.sinaimg.cn/survey/images/sina_logo.png";e.style.background="url("+s+") center center no-repeat #eee",e.style.backgroundSize="102px 44px",e.onclick=function(){var s=t.getAttribute("data-src");t.src=s+"?"+(new Date).getTime(),e.onclick=null}}};var T=function(t){t&&m.ajax(w+u+t,{method:"post",success:function(e){var n=null;if(n="string"==typeof e?JSON.parse(e):e,window["sina_survey_status_"+t]=n.result.status.code,l[t]=n.result.status.code,window.sina_survey_config&&"_blank"==window.sina_survey_config.resultType)k.init(t);else if(0==n.result.status.code||102==n.result.status.code)k.init(t);else{var a=C.getStatus(t);1==s[t].survey.type&&1==s[t].survey.others.result_show&&a?C.init(t):k.init(t)}}})},k={init:function(t){if(h||p[t]){var e=this;this.addCss(t),setTimeout(function(){e.cHtml(t),setTimeout(function(){e.setImgInfo()},100)},100)}},addCss:function(t){var e=document.getElementsByTagName("head")[0],s=document.getElementById("sina_survey_css"),n=document.createElement("link"),a=null,i="";window.sina_survey_config&&(a=window.sina_survey_config.surveyCss),a&&!s&&(i=-1!=a.toString().indexOf("http")?a:"pc"!=f?w+"//n.sinaimg.cn/survey/css/sina_survey_m_js.css":w+"//n.sinaimg.cn/survey/css/sina_survey_js.css",n.id="sina_survey_css",n.rel="stylesheet",n.type="text/css",n.href=i,e.appendChild(n))},setImgInfo:function(){var t="";window.sina_survey_config&&(window.sina_survey_config.source,t=window.sina_survey_config.imgWidth);for(var e=m.getByClass(document,"survey_img_box"),s=0;s'+d+""):(d="已结束",c.innerHTML=''+d+""),1==a&&2!=i&&(c.innerHTML+=''+_.survey+"人参与"),u.className="survey_content_item_wrap survey_content_item_wrap_"+e.id,r.innerHTML=e.title;for(var h=0;h提交';else switch(l[t]){case 0:case 102:p='提交';break;case 101:p='已结束';break;default:p='已提交'}var y="",g=C.getStatus(t);return 1==e.others.result_show&&2!=e.type&&g&&window.sina_survey_config&&"_blank"==window.sina_survey_config.resultType&&(y="查看结果'),2==e.status&&(p='已结束'),o.innerHTML+='",o},cItem:function(t,e,n){var a=s[n].content.answer[t];switch(e.others.question_type){case"1":return this.radio(e,a,n);case"2":return this.checkBox(e,a,n);case"3":return this.text(e,a,n);case"4":return this.score(e,a,n);case"5":return this.radio(e,a,n);case"6":return this.checkBox(e,a,n)}},radio:function(t,e,s){var n="",a="";1==t.others.question_selection&&(n='*');for(var i=0;i',l=""):i%2==1&&(d="",l="")):this.parentWidth>320&&this.parentWidth<=480?(c="survey_img_box_min",i%3==0?(d='',l=""):i%3==2&&(d="",l="
")):i%4==0?(d='',l=""):i%4==3&&(d="",l="
"):i%2==0?(d='',l=""):i%2==1&&(d="",l="
"),i==e.length-1&&(l=""),-1==g.indexOf("http")&&(g=w+g),o='',r="survey_img_box",c&&"pc"==f&&(u=c)}a+=d+''+l}return''+t.sort_id+'、'+t.description+""+n+'
"},checkBox:function(t,e,s){var n="",a="";1==t.others.question_selection&&(n='*('+(t.others.checkbox_num_least>0?" 最少"+t.others.checkbox_num_least+"项 ":"")+(t.others.checkbox_num_most>0?" 最多"+t.others.checkbox_num_most+"项":"")+')');for(var i=0;i',l=""):i%2==1&&(d="",l="")):this.parentWidth>320&&this.parentWidth<=480?(c="survey_img_box_min",i%3==0?(d='',l=""):i%3==2&&(d="",l="
")):i%4==0?(d='',l=""):i%4==3&&(d="",l="
"):i%2==0?(d='',l=""):i%2==1&&(d="",l="
"),i==e.length-1&&(l=""),-1==g.indexOf("http")&&(g=w+g),o='',r="survey_img_box",c&&"pc"==f&&(u=c)}a+=d+'"+e[i].description+'
'+l}return''+t.sort_id+'、'+t.description+""+n+'
"},text:function(t,e){var s="",n="";return 1==t.others.question_selection&&(s='*'),n+='',''+t.sort_id+'、'+t.description+""+s+'
"},score:function(t,e){var s="",n="";1==t.others.question_selection&&(s='*');for(var a=0;a"+o+""}return n='',''+t.sort_id+'、'+t.description+""+s+'
"},show:function(t){m.getByClass(document,"survey_content_body_"+t)[0].style.display="block"},hide:function(t){m.getByClass(document,"survey_content_body_"+t)[0].style.display="none"},getData:function(t){var e="true";return 0==s[t].survey.others.true_result&&(e="fake"),s[t].total[e]}},E={init:function(t){this.addDomEvent(t),this.scoreBoxEvent(t)},addDomEvent:function(t){var e=s[t].survey,n=m.getByClass(document.body,"survey_content_body_"+e.id)[0],a=(m.getByClass(n,"survey_score_box"),this);m.addEvent(n,"click",function(s){var n=s.target;if("I"===n.tagName){2==e.others.vote_show?a.nextEvent(n,t):a.scoreEvent(n);var i=m.getParentTagName(n,"UL");m.addClass(i,"active"),m.removeClass(i,"tip"),i.style.background=""}}),m.addEvent(n,"change",function(s){var n=s.target;if(2!=e.others.vote_show||"TEXTAREA"!==n.tagName&&"INPUT"!==n.tagName)switch(n.tagName){case"INPUT":a.inputEvent(n);break;case"I":a.scoreEvent(n)}else a.nextEvent(n,t);var i=m.getParentTagName(n,"UL");m.removeClass(i,"tip"),i.style.background=""}),m.addEvent(n,"mouseover",function(t){var e=t.target;if("I"===e.tagName)for(var s=e.parentNode.getElementsByTagName("i"),n=s.length,a=0;a=s?m.removeClass(n[a],"active"):m.addClass(n[a],"active")}},inputEvent:function(t){var e=m.getParent(t,"survey_content_item"),s=e.getElementsByTagName("input");if("radio"==t.type&&e.setAttribute("data-answer",t.value),"checkbox"==t.type){e.getAttribute("data-min");for(var n=e.getAttribute("data-max"),a=[],i=0,o=0;on)return t.checked=!1,void B.show("最多选择"+n+"项");e.setAttribute("data-answer",a.join("-"))}},scoreEvent:function(t){for(var e=t.parentNode.getElementsByTagName("i"),s=!0,n=0;n0){for(var r=0,c=0;c0){var i=null;if("wechat"!=f){if("client"==f)return void(g&&g.login({},function(t){1==s[n].survey.anti_cheat_strategy?S.init(n):e.postForm(n)}));if(!(window.userInfo||e.getCookie()))return void(window.WapLogin?(i="function"==typeof WapLogin?new WapLogin:this).login(!1,function(t){S.init(n)}):(i=window.SINA_OUTLOGIN_LAYER)&&i.set("plugin",{parentNode:document.body,position:"center"}).register("login_success",function(){S.init(n)}).show())}}1==s[n].survey.anti_cheat_strategy?S.init(n):e.postForm(n)}else"scoreNoPass"!=a.code?B.show("请完善各必填项!",function(){B.highLight()}):B.show("多选题"+a.index+"最少选择"+a.min+"项!",function(){B.highLight()})})},getPostData:function(t){for(var e={survey_id:t,user_info:{user_id:"",user_type:1},vote:[],captcha:{captcha_token:S.captchaToken||"",value:S.value||""}},s=m.getByClass(document.body,"survey_content_item_wrap_"+t)[0],n=m.getByClass(s,"survey_content_item"),a=0;a0){var i=null;"wechat"!=f&&"client"!=f&&(i=window.userInfo||this.getCookie(),a.user_info.user_id=i.uid)}m.ajax(w+o,{method:"post",data:a,success:function(s){if(s){var n=null;switch((n="string"==typeof s?JSON.parse(s):s).result.status.code){case 0:N.changeBtn(t),S.showStatus=!1,S.captchaHide();var a="";return window.sina_survey_config&&"toast"==window.sina_survey_config.tipType&&(a="toast"),void B.show(n.result.status.msg,function(){window.sina_survey_records={},window.sina_survey_records[n.result.data.survey.id]=n.result.data.records,window.sina_survey_config?("_blank"==window.sina_survey_config.resultType?function(e){if(!C.getStatus(t))return;if("wechat"==f||"m"==f||"client_m"==f)window.location.href=w+e.result.data.url+"?time="+(new Date).getTime();else{var s=window.open("about:blank");s.location.href=w+e.result.data.url+"?time="+(new Date).getTime()}}(n):C.show(t,function(){k.hide(t)}),y[e]&&y[e](n)):C.show(t,function(){k.hide(t)})},a);case 106:case 107:S.showStatus=!1,C.show(t,function(){k.hide(t)});break;case 108:case 109:case 110:S.showStatus=!1;break;case 113:return S.status=!0,void B.show(n.result.status.msg,function(){S.getData(t)});case 112:case 114:S.showStatus=!0;break;default:S.showStatus=!1}S.captchaHide(),B.show(n.result.status.msg)}},error:function(t){}})}},C={getStatus:function(t){for(var e=!1,n=s[t].content.question,a=0;a已提交':1==s[t].survey.others.result_show&&n&&(this.init(t),e&&e())},init:function(t){if(!document.querySelector("#sina_survey_result_js_"+t)){var e=document.getElementById("sina_survey_result_css"),s=document.createElement("script"),n=null;t&&(window.sina_survey_config&&(n=window.sina_survey_config.resultCss),n&&!e&&s.setAttribute("data-css",n.toString()),s.setAttribute("data-parent",v[t]),s.id="sina_survey_result_js_"+t,s.type="text/javascript",s.src=w+c+t+".js?v="+(new Date).getTime(),p[t]?p[t].appendChild(s):h.parentNode.insertBefore(s,h),s.onload=s.onreadystatechange=function(){this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||window.sina_survey_config&&window.sina_survey_config.setPercent&&window.sina_survey_config.setPercent(t)})}}},S={init:function(t){this.surveyId=t,this.captchaToken="",this.captchaImg="",this.value="",this.height=this.height||"",this.status=!0,this.showStatus=!1,this.timer=null,this.getData(t)},getData:function(t){var e=this;m.jsonp({url:w+r+t,success:function(s){0==s.result.status.code&&(e.captchaImg=s.result.data.img,e.captchaToken=s.result.data.captcha_token,e.captchaTokenValue=s.result.data.value,e.cBody(t))}})},captchaShow:function(){var t=this;if(this.box){function e(){window.sina_survey_box_mask.style.display="block",t.box.style.display="block"}"pc"!=f?this.setStyle("",function(){e()}):e()}},captchaHide:function(){this.box&&(window.sina_survey_box_mask.style.display="none",this.box.style.display="none")},cBody:function(t){var e=document.createElement("div");e.className="survey_captcha_box clearfix",e.style.display="block",e.innerHTML='验证码
取消确定
',this.box?this.box.innerHTML=e.innerHTML:(this.box=e,document.body.appendChild(e)),this.addEvent(e,t),this.captchaShow()},addEvent:function(t,e){var s=this;if("pc"!=f){var n=this.box.getElementsByTagName("input")[0];n.onfocus=function(){s.setStyle("focus")},n.onblur=function(){s.setStyle("blur")}}this.box.ontouchmove=function(t){t.preventDefault()},t.onclick=function(t){if("survey_captcha_cancel"==t.target.className&&s.captchaHide(),"survey_captcha_ok"==t.target.className){if(!s.status)return;s.status=!1;var n=setTimeout(function(){s.status=!0,clearTimeout(n)},1500),a=m.getByClass(document,"survey_captcha_code_"+s.surveyId)[0].value;""!=m.removeSpace(a)?(s.value=a,N.postForm(s.surveyId)):(B.show("请输入验证码!"),s.status=!0)}"survey_captcha_img"==t.target.className&&s.getData(e)}},setStyle:function(t,e){if("m"==f||"pc"==f){var s=this.height||this.box.clientHeight;return s&&(this.height=s),this.box.style.position="fixed",this.box.style.top="50%",this.box.style.marginTop="-"+s/2+"px",void(e&&e())}var n=this,a=navigator.userAgent.toLowerCase(),i="ios";t&&"blur"==t?(clearTimeout(this.timer),this.timer=setTimeout(function(){n.setTop(e),clearTimeout(n.timer)},500)):(-1!=a.indexOf("android")&&(i="android"),"ios"==i?n.setTop(e):"android"==i&&(clearTimeout(this.timer),this.timer=setTimeout(function(){n.setTop(e),clearTimeout(n.timer)},500)))},setTop:function(t){if(window.sina_survey_config&&window.sina_survey_config.setTop)window.sina_survey_config.setTop(this.box,e);else{var s=this.height||this.box.clientHeight;s&&(this.height=s),I(this.box,s)}t&&t()}},B={init:function(){this.height=this.height||"",this.timer=null,this.cBody()},cBody:function(){if(!document.getElementById("survey_tip_box")){var t=document.createElement("div"),e=document.createElement("div");t.id="survey_captcha_box_mask",t.className="survey_captcha_box_mask",e.id="survey_tip_box",e.className="survey_tip_box",e.innerHTML='提示
确定
',window.sina_survey_box_mask=t,document.body.appendChild(t),document.body.appendChild(e),m.addEvent(e,"touchmove",function(t){t.preventDefault()}),m.addEvent(t,"touchmove",function(t){t.preventDefault()}),m.addEvent(t,"click",function(t){t.preventDefault()})}},show:function(t,e,s){if(s&&"toast"==s){var n=document.querySelector(".survey_toast_box");return n||((n=document.createElement("div")).className="survey_toast_box",n.innerHTML=t,document.body.appendChild(n)),n.style.display="block",window.sina_survey_config.setTop&&window.sina_survey_config.setTop(n),void setTimeout(function(){n.style.opacity=0,setTimeout(function(){n.style.display="none",n.style.opacity=1},1e3)},1e3)}var a=document.getElementById("survey_captcha_box_mask"),i=document.getElementById("survey_tip_box");i.getElementsByTagName("p")[0].innerHTML=t,a.style.display="block","pc"!=f?this.height?this.setStyle(function(){i.style.display="block"}):(i.style.display="block",this.setStyle()):i.style.display="block",m.getByClass(i,"survey_tip_btn")[0].onclick=function(){S.showStatus&&S.captchaShow(),S.box&&"block"==S.box.style.display||S.showStatus||(a.style.display="none"),i.style.display="none",e&&e()}},highLight:function(){if(3==_.getAttribute("data-type")?_.getElementsByTagName("textarea")[0].focus():m.addClass(_.getElementsByTagName("ul")[0],"tip"),"m"==f){var t=m.getPos(_).top;window.scrollTo(0,t)}},setStyle:function(t){if("m"==f||"pc"==f){var e=document.getElementById("survey_tip_box"),s=this.height||e.clientHeight;return s&&(this.height=s),e.style.position="fixed",e.style.top="50%",e.style.marginTop="-"+s/2+"px",void(t&&t())}var n=this,a="ios",i=0;-1!=navigator.userAgent.toLowerCase().indexOf("android")&&(a="android"),"ios"==a?i=300:"android"==a&&(i=500),clearTimeout(this.timer),this.timer=setTimeout(function(){n.setTop(t),clearTimeout(n.timer)},i)},setTop:function(t){var s=document.getElementById("survey_tip_box");if(window.sina_survey_config&&window.sina_survey_config.setTop)window.sina_survey_config.setTop(s,e);else{var n=this.height||s.clientHeight;n&&(this.height=n),I(s,n)}t&&t()}},I=function(t,e){var s=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight||document.body.clientHeight,a=Math.floor((n-e)/2)+s;t.style.position="absolute",t.style.marginTop=0,t.style.top=a+"px"};T(e)}();